<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>实名认证</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" href="../../plugins/mui/mui.min.css">
    <link rel="stylesheet" type="text/css" href="../../plugins/mui/mui.previewimage.css"/>
    <link rel="stylesheet" href="../../css/my/certification/index.css" />
    <script src="../../js/statistics.js"></script>
</head>
<body>
	<header class="mui-bar mui-bar-nav">
	    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	    <h1 class="mui-title">实名认证</h1>
	</header>
	<div class="mui-content vh" id="content">
	</div>

<script type="text/javascript" src='../../plugins/jquery/jquery-3.1.0.min.js'></script>
<script src="../../plugins/mui/mui.min.js"></script>
<script src="../../plugins/mui/mui.zoom.js"></script>
<script src="../../plugins/mui/mui.previewimage.js" ></script>
<script src="../../plugins/template/template.js" ></script>
<script src="../../js/getApiToken.js"></script>
<script src="../../js/md5.js"></script>
<script type="text/html" id="contentTpl">
	<div class="content-card">
		<div class="mui-input-row">
			<label>真实姓名</label>
			<span>{{true_name}}</span>
		</div>
		<div class="mui-input-row">
			<label>身份证号</label>
			<span>{{creadit_card}}</span>
		</div>
		<div class="card">
			<p class="card-tit">身份证照（正面）</p>
			<div class="card-img-box">
				<img src="{{base_url}}{{front_pic}}" data-preview-src="" data-preview-group="1"/>
			</div>
		</div>
		<div class="card">
			<p class="card-tit">身份证照（反面）</p>
			<div class="card-img-box">
				<img src="{{base_url}}{{back_pic}}" data-preview-src="" data-preview-group="1"/>
			</div>
		</div>
		<div class="card">
			<p class="card-tit">手持身份证照</p>
			<div class="card-img-box center">
				<img src="{{base_url}}{{main_pic}}" class="img-response" data-preview-src="" data-preview-group="1"/>
			</div>
		</div>
		{{if remark}}
		<div class="remark">
			审核备注：
			<span class="txt-indent">{{remark}}</span>
		</div>
		{{/if}}
	</div>
	{{if type}}
	<div class="btn-box">
			<button class="mui-btn mui-btn-suceess" id="submitBtn">重新认证</button>
		</div>
	{{/if}}
</script>
<script type="text/javascript">
	mui.init();
	mui.plusReady(function(){
		var data = {
			user_token: plus.storage.getItem('cg_user_token'),
			user_id: plus.storage.getItem('cg_user_id')
		}
		console.log(JSON.stringify(data));
		var self = plus.webview.currentWebview(),
			type = self.type;
		myAjax('personal/UserProfile/getUserCertificationInfo','GET',data,function(e){
//			console.log(e);
//			console.log(JSON.stringify(e));
//			console.log(_baseUrl);
			var resType = '';
			if(type && type == 'error'){
				resType = 'error';
			}
			e.type = resType;
			e.base_url = _baseUrl;
			var contentHtml = template('contentTpl',e);
			document.getElementById("content").innerHTML = contentHtml;
			mui.previewImage();
			mui(".btn-box").on('tap','#submitBtn',function(){
				mui.openWindow({
					url: 'user-4.html',
					id: 'user-4.html',
					show: {
						duration: 200 //页面动画持续时间，Android平台默认100毫秒，iOS平台默认200毫秒；
					},
					waiting: {
						title: '正在加载...' //等待对话框上显示的提示内容
					}
				})
			},false);
		})				
	})
</script>
</body>
</html>
